'use strict';

const Controller = require('egg').Controller;

class UserController extends Controller {
  async index() {
    const { ctx } = this;
    ctx.body = '<h1>hi, 我是user页面</h1>';
  }

  async register() {
    console.log('sql---: ' , this.app.mysql)
    let listData = await this.app.mysql.query('select * from users;');
    // console.log(listData, 'data---')
    // this.ctx.body = 'data';
  }

  async login() {

  }
}

module.exports = UserController;
